package com.rpay.common.enums;

/**
 * Title：
 * Description
 *
 * @author fxg06 on 2018/4/30
 * @version 1.0
 */
public enum MailTemplateEnum {
    REGISTER("REGISTER", "mail/register.ftl","RPAY邮件验证码", "注册模板"),
    FORGET_PWD("FORGET_PWD","mail/forgetPwd.ftl","RPAY邮件验证码", "忘记密码"),
    MODIFY_PWD("MODIFY_PWD","mail/modifyPwd.ftl", "RPAY邮件验证码","修改密码"),

    WITHDRAW("WITHDRAW", "mail/withdraw.ftl", "RPAY邮件验证码", "提现"),
    CONTRACT("CONTRACT", "mail/contract.ftl", "RPAY邮件验证码", "选择合约"),
    TRADE("TRADE_PWD", "mail/transactionPwd.ftl", "RPAY邮件验证码", "设置交易密码"),

    WALLET("WALLET", "mail/wallet.ftl", "RPAY邮件验证码", "设置钱包地址"),

    CONVERT("CONVERT", "mail/convert.ftl", "RPAY邮件验证码", "设置转换"),

    TRANSFER("TRANSFER", "mail/transfer.ftl", "RPAY邮件验证码", "设置互转"),

    BIND("BIND", "mail/bind.ftl", "RPAY邮件验证码", "绑定手机或邮箱");

    private String code;
    private String template;
    private String subject;
    private String desc;

    MailTemplateEnum(String code, String template, String subject, String desc) {
        this.template = template;
        this.code = code;
        this.subject = subject;
        this.desc = desc;
    }

    public static MailTemplateEnum getTemplate(String code) {
        for (MailTemplateEnum templateEnum : MailTemplateEnum.values()) {
            if (templateEnum.getCode().equals(code)) {
                return templateEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }
}

